dim limit
limit = inputbox("more than ?mm",limit,"0.2")
dim doc
set doc=application.activedocument
Set objs = doc.GetObjects(15,,true)

dim fso
set fso = createobject("scripting.filesystemobject") 
dim fw
set fw = fso.createtextfile("c:\0.txt")

msgbox objs.count
dim ncount
ncount = 0
for each obj in objs
	'msgbox obj.ObjectType
	'msgbox obj.name	
	if obj.name="Geometry.Height" then 
		
		fw.writeline(obj.component.name & chr(9) & obj.text)
		val1 = lcase(obj.text)
		val2 = replace(val1,"mm","")
		val3 = replace(val1,"mil","")
		'msgbox val1 & "," & val2  & "," & val3
		
		fw.writeline(val1 & "," & val2  & "," & val3)
		'mm
		if val1=val2 then
		else
			'msgbox "neq"
			val2= cdbl(val2)
			fw.writeline(val2-limit)
			'msgbox val2>=limit
			if val2-limit>=0 then
				obj.component.Selected =true
				ncount = ncount+1
			end if
		end if


		'mil
		limit = limit * 39.37
		'msgbox val3 & "," & limit
		'msgbox val3-limit
		if val1=val3 then
		else
			'msgbox "neq"
			fw.writeline(val3-limit)
			if val3-limit>=0 then
				obj.component.Selected =true
				ncount = ncount+1
			end if
		end if
	end if
next
msgbox ncount
fw.close
set fw = nothing
set fso = nothing